package org.jcut.controller;

import org.jcut.data.Data;
import org.jcut.service.TypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RequestMapping("/type")
@RestController
public class TypeController {
	@Autowired
	private Data data;
	@Autowired
	private TypeService service;
	@RequestMapping("/select")
	public Data select() {
		
		data.setData(service.select());
		data.setMsg("查询成功！");
		data.setStatus("1");
		return data;
		
	}
	@RequestMapping("/selectTwoType")
	public Object selectTwoType(String tName) {
		System.out.println(tName);		
		data.setData(service.selectTwoType(tName));
		data.setMsg("查询成功！");
		data.setStatus("1");
		return data;
	}
}
